<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>毫秒表</title>
    <style>
        h2 {
            display: block;
            font-size: 64px;
            margin: 200px auto;
            text-align: center;
        }
    </style>
</head>
<body>
    <h2></h2>
    <script>
        var h2 = document.querySelector("h2");
        setInterval(function() {
            var now = new Date();
            var h = now.getHours();
            var m = now.getMinutes();
            var s = now.getSeconds();
            var ms = now.getUTCMilliseconds();
            h2.innerHTML = ""+h+": "+m+": "+s+": "+ms;
        }, 1);


    </script>
</body>
</html>